import type { IFieldProps, IConfigProps } from '@/components/sofastui/AdvancedTable/interface'

export const fields: IFieldProps[] = [
  {
    label: '岗位名称',
    prop: 'name',
    minWidth: 60,
    import: true,
    export: true,
    search: true,
  },
  {
    label: '岗位编码',
    prop: 'code',
    minWidth: 60,
    import: true,
    export: true,
    search: true,
  },
  {
    label: '创建时间',
    prop: 'createdAt',
    minWidth: 60,
    import: true,
    export: true,
    search: true,
  },
  {
    label: '修改时间',
    prop: 'updatedAt',
    minWidth: 60,
    import: true,
    export: true,
    search: true,
  },
]

export const config: IConfigProps = {
  name: 'powDatascopeTable',
  rowKey: 'id',
  url: '/api/idt/datascope',
  selection: true,
  add: true,
  delete: true,
  expand: true,
  showIndex: true,
  import: true,
  export: true,
  search: true,
  advancedSearch: true,
  refresh: true,
  settings: true,
}

export const formRules: unknown[] = [
  {
    type: 'fcRow',
    children: [
      {
        type: 'col',
        props: {
          span: 12,
        },
        _fc_drag_tag: 'col',
        _fc_template: 'col3',
        children: [
          {
            type: 'input',
            field: 'Fvvymbi32tn7apc',
            title: '用户名',
            $required: true,
            props: {
              placeholder: '请输入用户名',
            },
            _fc_id: 'id_Fxt6mbi32tn7aqc',
            name: 'ref_Fdztmbi32tn7arc',
            _fc_drag_tag: 'input',
            display: true,
            hidden: false,
            wrap: {
              title: true,
            },
          },
        ],
        _fc_id: 'id_Ffvcmbi325ukafc',
        name: 'ref_Fdrhmbi325ukagc',
        display: true,
        hidden: false,
      },
      {
        type: 'col',
        props: {
          span: 12,
        },
        _fc_drag_tag: 'col',
        _fc_template: 'col3',
        children: [
          {
            type: 'input',
            field: 'Fyelmbi32v77asc',
            title: '密码',
            $required: true,
            props: {
              placeholder: '请输入用户名',
            },
            _fc_id: 'id_F4kfmbi32v77atc',
            name: 'ref_Fauxmbi32v77auc',
            _fc_drag_tag: 'input',
            display: true,
            hidden: false,
          },
        ],
        _fc_id: 'id_Fhssmbi325ukahc',
        name: 'ref_F431mbi325ukaic',
        display: true,
        hidden: false,
      },
      {
        type: 'col',
        props: {
          span: 12,
        },
        _fc_drag_tag: 'col',
        _fc_template: 'col3',
        children: [
          {
            type: 'input',
            field: 'Fwrvmbi32wfmavc',
            title: '姓名',
            $required: true,
            props: {
              placeholder: '请输入用户名',
            },
            _fc_id: 'id_Fh03mbi32wfmawc',
            name: 'ref_Fc1dmbi32wfmaxc',
            _fc_drag_tag: 'input',
            display: true,
            hidden: false,
          },
        ],
        _fc_id: 'id_F5w5mbi325ukajc',
        name: 'ref_Fvr2mbi325ukakc',
        display: true,
        hidden: false,
      },
      {
        type: 'col',
        props: {
          span: 12,
        },
        _fc_drag_tag: 'col',
        _fc_template: 'col3',
        _fc_id: 'id_Fca3mbi32ni2anc',
        name: 'ref_Ffc4mbi32ni2aoc',
        children: [
          {
            type: 'input',
            field: 'Fyv2mbi32xvmayc',
            title: '身份证号码',
            $required: true,
            props: {
              placeholder: '请输入用户名',
            },
            _fc_id: 'id_Fsjrmbi32xvnazc',
            name: 'ref_Fansmbi32xvnb0c',
            _fc_drag_tag: 'input',
            display: true,
            hidden: false,
          },
        ],
        display: true,
        hidden: false,
      },
      {
        type: 'col',
        props: {
          span: 12,
        },
        _fc_drag_tag: 'col',
        _fc_template: 'col3',
        _fc_id: 'id_F3osmbi37koib7c',
        name: 'ref_Fr75mbi37koib9c',
        children: [
          {
            type: 'input',
            field: 'Fd1nmbi37koib6c',
            title: '手机号码',
            $required: true,
            props: {
              placeholder: '请输入用户名',
            },
            _fc_id: 'id_Fan9mbi37koib8c',
            name: 'ref_Fm11mbi37koibac',
            _fc_drag_tag: 'input',
            display: true,
            hidden: false,
          },
        ],
        display: true,
        hidden: false,
      },
    ],
    _fc_drag_tag: 'fcRow',
    _fc_template: 'col3',
    _fc_id: 'id_Fvu0mbi325ukalc',
    name: 'ref_Fi1smbi325ukamc',
    display: true,
    hidden: false,
    props: {
      gutter: 10,
    },
  },
]
